<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php 
if(!isset($title)){
	$title = NJU网上商城;
}
include_once '../Page/authentic.php';//这里已经调用了session_start();

?>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title><?php echo $title;?></title>
<link href="../css/main.css" rel="stylesheet" type="text/css" />
<link href="../css/<?php echo $css;?>" rel="stylesheet" type="text/css" />

<script src="../js/top.js" type="text/javascript"></script>
</head>

<body>
	<div id="float_user">
		<div id="float_user_nav">
			<div id="float_user_nav_left">
				<?php 
				if(!$_SESSION["Passed"]){//如果未登录
				?>
				<form action="login.php" method="post">
					<p>
						用户名:<input type="text" name="name"  autocomplete="off"/>
						密码:<input type="password" name="password"  autocomplete="off"/>
						<input type="submit" value="登录" />
					</p>
				</form>
				<a href="regedit.php">注册账号</a>
				<?php 
				}else{
				?>
				<div id="hello">
					<b><?php echo $_SESSION['User']["userName"];?></b>
					<p>您好，欢迎来到NJU网上商城</p>
				</div>
				<?php 
				}
				?>
			</div>
			<?php 
			if($_SESSION["Passed"]){//如果登录
			?>
			<div id="float_user_nav_right">
				<a href="personal.php">个人中心</a>
				<p>|</p>
				<a href="cart.php">购物车</a>
				<p>|</p>
				<a href="logout.php">退出</a>
			</div>
			<?php 
			}
			?>
		</div>
	</div>
	<div id="container">
		<div id="container_top">
			<div id="container_logo">
				<a href="index.php">
					<img src="../image/logo.png" alt="NJU网上商城" />
				</a>
			</div>
			<div id="container_search">
				<div id="container_search_tips">
					<ul id="container_search_tips_ul">
						<li id="search_first_tab">
							<div class="ls"></div>
							<a href="javascript:;">手机</a>
							<div class="rs"></div>
						</li>
						<li>
							<div class="ls"></div>
							<a href="javascript:;">家具</a>
							<div class="rs"></div>
						</li>
						<li>
							<div class="ls"></div>
							<a href="javascript:;">服装</a>
							<div class="rs"></div>
						</li>
						<li>
							<div class="ls"></div>
							<a href="javascript:;">电脑</a>
							<div class="rs"></div>
						</li>
						<script type="text/javascript">
						initSearchTips();
						</script>
					</ul>
				</div>
				<div id="container_search_context">
					<div class="ls"></div>
					<form action="search.php" method="post">
						<input type="text" name="key" value=""/>
						<input type="submit"" value="搜索"/>
					</form>
					<div class="rs"></div>
				</div>
			</div>
		</div>
		<div id="container_body">